package com.webshop.demo.service.impl;

import com.webshop.demo.service.DemoTestService;
import com.xphsc.easyjdbc.EasyJdbcTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

/**
 * Created by LBG on 2019/4/20.
 */
@Component("demoTestService")
public class DemoTestServiceImpl implements DemoTestService {

    @Autowired
    private EasyJdbcTemplate easyJdbcTemplate;

    @Override
    public String getHyEmployee() {
        List<Map<String, Object>> maps = easyJdbcTemplate.find("select * from hr_employee", null);
        return maps.toString();
    }
}
